<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<% 
	String basePath = request.getScheme() + "://" +
					  request.getServerName() + ":" +
					  request.getServerPort() + 
					  request.getContextPath() + "/";

%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html>
<html>
<head>
<base href="<%=basePath %>">
<title>Login</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<script type="text/javascript" src="js/jquery-1.8.2.min.js"></script>
<link href="css/style.css" rel='stylesheet' type='text/css' />
</head>
<body>
	<h1>CMS管理系统</h1>
	<div class="login-form">
		<div class="close"></div>
		<div class="head-info">
			<span style="font-size:25px ; margin-left: 20px;color:red ; line-height: 50px ;">${sessionScope.msg}</span>
			<c:remove var="msg" scope="session"/>
			<label class="lbl-1"> </label> <label class="lbl-2"> </label> <label
				class="lbl-3"> </label>
		</div>
		<div class="clear"></div>
		<div class="avtar">
			<img src="images/avtar.png" />
		</div>
		<form action="jsp/LoginServlet" method="post" onsubmit="return check()">
			<input id="username" type="text" class="text" name="username" value="Username"
				onfocus="this.value = '';"
				onblur="if (this.value == '') {this.value = 'Username';}">
			<div id="password" class="key">
				<input type="password" name="password" value="Password" onfocus="this.value = '';"
					onblur="if (this.value == '') {this.value = 'Password';}">
			</div>
			<div class="signin">
				<input type="submit" value="Login">
			</div>
		</form>

	</div>
	<div class="copy-rights">
		<p>
			Copyright &copy; 2018.briup <a href="http://www.briup.com" target="_blank"
				title="昆山杰普">杰普软件</a>
	</div>

</body>
<script type="text/javascript">
	function check(){
		var name = $('#username').attr('value') ;
		var pwd = $('#password').attr('value') ;
	
		
		if(name == '' || pwd == '' || name == 'Username' || pwd == 'Password'){
			alert('账户或密码不能为空！') ;
			return false ;
		}else{
			return true ;
		}
		
	}
</script>
</html>